package com.framework.service.impl;

import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.framework.dao.BaoHeDao;
import com.framework.entity.tran.TranBaoHe;
import com.framework.service.BaoHeService;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 功能描述: 宝盒接口
 *
 * @author ck
 * @date 2018/8/28 19:46
 */
@Service("baoHeService")
public class BaoHeServiceImpl extends ServiceImpl<BaoHeDao, TranBaoHe> implements BaoHeService {

	@Override
	public TranBaoHe queryBaoHeBySn(String sn, Date returnDate) {
		TranBaoHe t = new TranBaoHe();
		t.setSn(sn);
		t.setReturnDate(returnDate);
		return baseMapper.selectOne(t);
	}

	@Override
	public List<Map<String, Object>> queryBaoHeReturnList() {
		return baseMapper.queryBaoHeReturnList();
	}

	@Override
	public boolean isThisMonthReq(String sn) {
		return baseMapper.isThisMonthReq(sn);
	}
}

